var PlayLayer = cc.Layer.extend({
	backgroundLayer : null,
	mainLayar : null,
	tip_layer:null,
	flow:null,
	ctor:function () {
		this._super();
		this.initFrames();
		gg.initTeach();
		this.backgroundLayer = new PlayBackgroundLayer(this);
//		this.backgroundLayer = new cc.LayerColor(cc.color(20, 40, 50, 255));
//		this.addChild(this.backgroundLayer);
		this.flow=new TeachFlow(this);
		this.mainLayer = new PlayMainLayer(this,TAG_MAIN);
		ll.tip_layer = new TipLayer(this);
		this.tool_layer = new ToolLayer(this);
		
		this.flow.init(ll.tip_layer.tip,ll.tip_layer.tip_frame, ll.tip_layer.flash);
		this.flow.start();
		this.flow.next();
	},
	initFrames : function(){
		cc.spriteFrameCache.addSpriteFrames(res_play.run_p);
		cc.spriteFrameCache.addSpriteFrames(res_play.run_p_1);
	},
	over:function (){
		ll.tip_layer.over();
		$.runScene(new FinishScene());
	}
});
var PlayScene = PScene.extend({
	onEnter:function () {
		this._super();
		var layer = new PlayLayer();
		this.addChild(layer);
	}
});
